<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="net.comm.user.bean.UserConstant"%><html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>${theForm.nick}的个人主页:i友邻社区</title>
	<link href="${cpath}/css/youlin.css" type=text/css rel=stylesheet>
	<script type="text/javascript" src="${cpath}/fckeditor/fckeditor.js"></script>
	<!--[if IE 6]>
	  <script type="text/javascript" src="${cpath}/jspng/DD_belatedPNG_0.0.8a-min.js"></script>
	  <script type="text/javascript" src="${cpath}/jspng/ie6-png.js"></script>
	<![endif]-->
	<link  href="${cpath}/css/pop.css" rel="stylesheet" type="text/css">
	
	<script src="<%=path%>/js/imgEdit/jquery_imgEdit.js"></script>
	<script type="text/javascript" src="<%=path%>/js/imgPreview/CJL.0.1.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/imgPreview/QuickUpload.js"></script>
	<script type="text/javascript" src="<%=path%>/js/imgPreview/ImagePreviewd.js"></script>
	<script type="text/javascript" src="${cpath}/fckeditor/fckeditor.js"></script>
	<script type="text/javascript" src="${cpath}/js/common.js"></script>
	<script type="text/javascript" src="${cpath}/js/DivController.js"></script>
	<script type="text/javascript" src="${cpath}/js/EventUtil.js"></script>
	<link  href="${cpath}/css/div.css" rel="stylesheet" type="text/css">
    <style>
	.perview {width:600px;background:#fff;font-size:12px; border-collapse:collapse;}
	.perview td, .perview th {padding:5px;border:1px solid #ccc;}
	.perview th {background-color:#f0f0f0; height:20px;}
	.perview a:link, .perview a:visited, .perview a:hover, .perview a:active {color:#00F;}
	.perview table{ width:100%;border-collapse:collapse;}
	</style>
	
    
	<script language="javascript" type="text/javascript">
      	<!--

		var arg = new Object();
		arg["mainDivId"] = "mainDiv";
		arg["bodyDivId"] = "bodyDiv";
		var divController = new DivController(arg);
		//divController.initDiv(divController);

		function toMsg(userId, userName, thisObj, left, top) {
			document.getElementById("divTitleTd").innerHTML = "与" + userName + "的私聊：";
			divController.openDiv(thisObj,left,top);
			var form = document.forms['form_msg_p'];
			form['receiver'].value  = userId;
			//alert(form['receiver'].value);
		}
		
		-->
	</script>

</head>
<body>
<!--外套 start -->
<div class="wrap">
  <!--页首 start -->
 	<%@ include file="/menuUser.jsp"%>
  <!--页首 end -->  
  <!--主体 start -->
 <div class="body theBody">
   <div class="leftBar">
      <div class="thebox1">
       <h3>我的邻居</h3>
       <div class="content content-lg" id="linjuDiv" >
          <ul>
			<c:forEach var="linju" items="${linjulist}" varStatus="status">                    
			   <li>
                <p onmouseover="disoper('lj${linju.linjuID}');"><!--<a href="${cpath}/users_home/userID_${linju.linjuID}.html" target="_blank"><img src="${cpath}/${myfn:getUserPic(linju.linjuID)}" width="51" height="51" title="${myfn:getMsg('FR_STS',linju.status)}"  class="user_icon_1"/></a>-->
				<a class="pic2" href="${cpath}/users_home/userID_${linju.linjuID}.html" target="_blank"><b></b><img src="${cpath}/${myfn:getUserPic(linju.linjuID)}" title="${myfn:getMsg('FR_STS',linju.status)}" width="48" height="48" border="0"/>
				</p>
                <p><a href="javascript:toMsg('${linju.linjuID}','${myfn:getUserNick(linju.linjuID)}',document.getElementById('linjuDiv'))">${myfn:getUserNick(linju.linjuID)}</a></p>
                <p id="lj${linju.linjuID}" style="display:none">
                     <a href="${cpath}/linju_delete/userID_${linju.userID}_linjuID_${linju.linjuID}.html"><img src="${cpath}/images/icon_04.gif" width="14" height="12" title="取消好友"/></a>
                     <a href="${cpath}/linju_addblack/userID_${linju.userID}_linjuID_${linju.linjuID}.html"><img src="${cpath}/images/icon_05.gif" width="12" height="12" title="坚决拉黑" /></a>
                     <a href="${cpath}/linju_update/userID_${linju.userID}_linjuID_${linju.linjuID}_status_2.html"><img src="${cpath}/images/icon_06.gif" width="12" height="12" title="深度交往" /></a>
                </p>           
               </li>
			</c:forEach>
         </ul>
       </div>
       <a class="more4" href="${cpath}/linju_list/qryUserID_${userID}.html">点击查看更多</a>
      </div>
      
       <div class="thebox1">
       <h3>我的部落</h3>
       <div class="content content-bl">
         <ul>
		   <c:forEach var="mygroup" items="${grouplist}" varStatus="status">
             <li><a href="${cpath}/group.do?action=get&groupID=${mygroup.groupID}">${myfn:getGroupName(mygroup.groupID)}</a></li>
		   </c:forEach>                    
         </ul> 
       </div>
       <a class="more4" href="${cpath}/gmember.do?action=mygrouplist&qryUserID=${userID}">点击查看更多</a>
      </div>

       <div class="thebox1">
       <h3>我的广场</h3>
       <div class="content content-gc">
          <p class="p1"><a href="${cpath}/shequ_home/villageID_${theForm.villageID}.html">社区广场</a></p>
          <p class="p2">今日加入（${newMemNum}）个会员</p>     
       </div>
      </div>

	<div class="thebox1">
       <h3>我的好友</h3>
       <div class="content content-lg" id="friendDiv">
          <ul>
			<c:forEach var="friend" items="${friendlist}" varStatus="status">  
              <li>
                <p onmouseover="disoper('fr${friend.friendID}');">
				<a class="pic2" href="${cpath}/users_home/userID_${friend.friendID}.html" target="_blank"><b></b><img src="${cpath}/${myfn:getUserPic(friend.friendID)}" width="48" height="48" border="0" title="${myfn:getMsg('FR_STS',friend.status)}" /></a></p>
                <p><a href="javascript:toMsg('${friend.friendID}','${myfn:getUserNick(friend.friendID)}',null,300,1000)">${myfn:getUserNick(friend.friendID)}</a></p>
                <p id="fr${friend.friendID}" style="display:none">
                   <a href="${cpath}/friend_delete/userID_${friend.userID}_friendID_${friend.friendID}.html"><img src="${cpath}/images/icon_04.gif" width="14" height="12"  title="取消关注" /></a>
                   <a href="${cpath}/friend_addblack/userID_${friend.userID}_friendID_${friend.friendID}.html"><img src="${cpath}/images/icon_05.gif" width="12" height="12" title="坚决拉黑"  /></a>
                   <a href="${cpath}/friend_updsts/userID_${friend.userID}_friendID_${friend.friendID}_status_2.html"><img src="${cpath}/images/icon_06.gif" width="12" height="12" title="深度交往"  /></a>
                 </p>           
              </li>
			</c:forEach>
         </ul>
       </div>
       <a class="more4" href="${cpath}/friend_list/qryUserID_${userID}.html">点击查看更多</a>
      </div>

       <div class="thebox1">
       <h3>谁看过我</h3>
       <div class="content content-kw">
			<c:forEach var="vistor" items="${vistorlist}" varStatus="status">
               <div>
                 <!--<a href="${cpath}/users_home/userID_${vistor.vistorID}.html" target="_blank"><img src="${cpath}/${myfn:getUserPic(vistor.vistorID)}" width="35" height="35"  title="${myfn:getUserNick(vistor.vistorID)}" class="user_icon_1"/></a>-->
				 <a class="pic3" href="${cpath}/users_home/userID_${vistor.vistorID}.html"><b></b><img src="${cpath}/${myfn:getUserPic(vistor.vistorID)}" width="35" height="35" title="${myfn:getUserNick(vistor.vistorID)}" border="0"/></a>
                  <p class="p1 lineColor1">${myfn:getUserNick(vistor.vistorID)}</p>
                  <p class="p2">${myfn:formatMDHM(vistor.mtime)}</p>
              </div>
			</c:forEach>  
       </div>
       <a class="more4" href="${cpath}/vistorlog_list/qryUserID_${userID}.html">点击查看更多</a>
      </div>
      
	<div class="thebox1">
       
      </div>
      
   </div>
   
   <div class="centerBar">
      <div class="thebox2">
      <h3>个性签名</h3>
      <div class="content" style="width:190px;left:60px;"> ${theForm.introduction} </div>
      </div>
      
      <div class="thebox1">
       <h3>邻居动态</h3>
       <div class="content content-dt">
         <ul>
			<c:forEach var="operlog" items="${linjuloglist}" varStatus="status"> 
              <li style="overflow:hidden;" >${operlog.content}</li>
			</c:forEach> 
         </ul> 
       </div>
       <a class="more4" href="${cpath}/operlog.do?action=linjulist&qryUserID=${userID}">点击查看更多</a>
      </div>
      
      <div class="thebox1">
       <h3>部落动态</h3>
       <div class="content content-dt">
         <ul>
			<c:forEach var="operlog" items="${grouploglist}" varStatus="status">
              <li style="overflow:hidden;">${operlog.content}</li>
			</c:forEach> 
         </ul> 
       </div>
       <a class="more4" href="${cpath}/operlog.do?action=grouplist&qryUserID=${userID}">点击查看更多</a>
      </div>
      
      <div class="thebox1">
       <h3>社区动态</h3>
       <div class="content content-dt">
         <ul>
			<c:forEach var="notadv" items="${notadvlist}" varStatus="status">  
              <li style="overflow:hidden;"><span class="lineColor1">[${myfn:getMsg("NOTADV_SORT",notadv.nsort)}${myfn:getMsg("NOTADV_TYPE",notadv.ntype)}]</span><A href="${cpath}/notadv.do?action=detail&qrySeqID=${notadv.seqID}"  target="_blank">${notadv.title} </a></li>
				</c:forEach> 
				<c:forEach var="operlog" items="${shequloglist}" varStatus="status">  
              <li style="overflow:hidden;">${operlog.content}</li>
			</c:forEach> 
         </ul> 
       </div>
       <a class="more4" href="${cpath}/operlog.do?action=shequlist&qryUserID=${userID}">点击查看更多</a>
      </div>  
      
      <div class="thebox1">
       <h3>好友动态</h3>
       <div class="content content-dt">
         <ul>
		 <c:forEach var="operlog" items="${friendloglist}" varStatus="status">  
            <li style="overflow:hidden;" >${operlog.content} </li>
		 </c:forEach> 
         </ul> 
       </div>
       <a class="more4" href="${cpath}/operlog.do?action=friendlist&qryUserID=${userID}">点击查看更多</a>
      </div>
      
      <div class="thebox1">
       <h3>涂鸦墙</h3>
      <div class="content content-ly">
          <ul class="leaveWord-list1" style="width:210px;">
			<c:forEach var="liuyan" items="${liuyanlist}" varStatus="status">  			
				<c:if test="${liuyan.follID == 0}">
                <p  id="ly${liuyan.seqID}" title="${liuyan.content}"><a href="${cpath}/users_home/userID_${liuyan.userID}.html" target="_blank">${myfn:getUserNick(liuyan.userID)}</a>:${fn:substring(liuyan.content,0,9)}</p>
                <p class="p2">
				<!--<a href="javascript:chgly('${liuyan.ntype}','${liuyan.nsort}','${liuyan.nsortID}','${liuyan.seqID}','${liuyan.title}');" title="回复"><img src="${cpath}/icon/mtag.gif"/></a> &nbsp;-->
				<a href="${cpath}/notadv.do?action=del&seqID=${liuyan.seqID}" title="删除"><img src="${cpath}/icon/icon02.gif" /></a> 
				<c:if test="${liuyan.status != '2'}">
				&nbsp;<a href="javascript:openliuyan('我投诉：${myfn:getUserNick(liuyan.userID)}','${liuyan.userID}','1','${liuyan.seqID}');" title="举报"><img src="${cpath}/icon/contact_blue_remove.png" /></a>
				</c:if>
				<span  style="right:0px;">${myfn:formatMDHM(liuyan.mtime)}</span></p>
				</c:if>
				<c:if test="${liuyan.follID != 0}">
                <p class="p3"><a href="${cpath}/users_home/userID_${liuyan.userID}.html" target="_blank">${myfn:getUserNick(liuyan.userID)}</a>: ${liuyan.content}<span style="right:0px;">${myfn:formatMDHM(liuyan.mtime)}</span></p>
				</c:if>
			</c:forEach>
        </ul>  
	  
   	  <form action="${cpath}/notadv.do" name="form_liuyan"  method="post" enctype="multipart/form-data" >
        <p><textarea name="content" cols="24" rows="4"></textarea></p>
         <p>
		 <a href="javascript:lysubmit();" class="btn_r">保  存</a>
		 </p>
			<input type="hidden" name='userID'		value='${userID}'/>
			<input type="hidden" name='ntype'		value=''/>
			<input type="hidden" name='nsort'		value=''/>
			<input type="hidden" name='nsortID'		value=''/>
			<input type="hidden" name='seqID'		value=''/>
			<input type="hidden" name='title'		value=''/>
			<input type="hidden" name='action'		value='add'/>
       </form>  
       </div>
   
      </div>
 
   </div>
   <div class="rightBar">
     <div class="thebox3">
        <h3>我的资料</h3>
        <div class="content">
		<form action="${cpath}/users.do?action=update" name="theForm" id="theForm" method="post" enctype="multipart/form-data"  class="frmMyInfo">
	     <p><label>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</label>
			<input type="radio" name='sex' value='1'
			<c:if test="${theForm.sex == '1'}">checked</c:if>
			/><img src="${cpath}/icon/icon_boy.gif" width="16" height="16" />&nbsp;
			<input type="radio" name='sex' value='2'
			<c:if test="${theForm.sex == '2'}">checked</c:if>
			/><img src="${cpath}/icon/icon_girl.gif" width="16" height="16" />
		 </p>
			<!--  <input type="checkbox" name='chkboxinterest' value='1'
				<c:if test="${fn:indexOf(theForm.interest,'1,') > -1}">checked</c:if>		
			/>文学
			<input type="checkbox" name='chkboxinterest' value='2'
				<c:if test="${fn:indexOf(theForm.interest,'2,') > -1}">checked</c:if>				
			/>艺术
			<input type="checkbox" name='chkboxinterest' value='3'
				<c:if test="${fn:indexOf(theForm.interest,'3,') > -1}">checked</c:if>						
			/>运动
			<input type="checkbox" name='chkboxinterest' value='4'
				<c:if test="${fn:indexOf(theForm.interest,'4,') > -1}">checked</c:if>						
			/>科技
			<input type="checkbox" name='chkboxinterest' value='5'
				<c:if test="${fn:indexOf(theForm.interest,'5,') > -1}">checked</c:if>						
			/>娱乐
			<br /><label>&nbsp;</label>
			<input type="checkbox" name='chkboxinterest' value='6'
				<c:if test="${fn:indexOf(theForm.interest,'6,') > -1}">checked</c:if>						
			/>亲子
			<input type="checkbox" name='chkboxinterest' value='7'
				<c:if test="${fn:indexOf(theForm.interest,'7,') > -1}">checked</c:if>						
			/>教育
			<input type="checkbox" name='chkboxinterest' value='8'
				<c:if test="${fn:indexOf(theForm.interest,'8,') > -1}">checked</c:if>						
			/>公益
			<input type="checkbox" name='chkboxinterest' value='9'
				<c:if test="${fn:indexOf(theForm.interest,'9,') > -1}">checked</c:if>						
			/>旅游
			<input type="checkbox" name='chkboxinterest' value='10'
				<c:if test="${fn:indexOf(theForm.interest,'10,') > -1}">checked</c:if>						
			/>时尚
			<br /><label>&nbsp;</label>
			<input type="checkbox" name='chkboxinterest' value='11'
				<c:if test="${fn:indexOf(theForm.interest,'11,') > -1}">checked</c:if>						
			/>其他
			<tag:ARRAY  id="interestSet" name="interestSet" options="<%=ValueMaping.USERSET_TYPE%>" value='${theForm.interestSet}' css="w50"/>
			</p>-->
         <p><label>个人特长:</label>
		 <input type="text" name='skill' value='${theForm.skill}' class="s150" />&nbsp;&nbsp;
		 <tag:ARRAY  id="skillSet" name="skillSet" options="<%=ValueMaping.USERSET_TYPE%>" value='${theForm.skillSet}' css="w50" />
         </p>
         <p><label>生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;肖:</label>
		 <tag:ARRAY  id="chzodiac" name="chzodiac" options="<%=ValueMaping.SHXIAO_TYPE%>" value='${theForm.chzodiac}'/>
		 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		 <label>星&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;座:</label>
		 <tag:ARRAY  id="star" name="star" options="<%=ValueMaping.STAR_TYPE%>" value='${theForm.star}'/>
		 </p>
         <div class="myInfo-jg">
          <label>籍&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;贯:</label>
          <div class="myInfo-jg-right">          
			&nbsp;<tag:CNPCA name="home_location" id="home_location" pid="0" cid="0" value='${theForm.home_location}'   onchange="getAjaxdata('homepid',this.value)" onkeydown="catch_keydown(this);" css="w70"/>&nbsp;
			<div id=homepid style="display:inline">
			<c:if test="${theForm.home_location != 0}">
			<tag:CNPCA name="home_sublocation" pid="${theForm.home_location}" cid="0" value='${theForm.home_sublocation}'  onkeydown="catch_keydown(this);"  css='w70'/>
			</c:if>
			<c:if test="${theForm.home_location == 0}">
			<select name='home_sublocation' onkeydown='catch_keydown(this);'></select>
			</c:if>
			</div>		
			<!--
			<div id=homecid style="display:inline">
			<c:if test="${theForm.home_sublocation != 0}">
			<tag:CNPCA name="home_area" cid="${theForm.home_sublocation}"  value='${theForm.home_area}'  onkeydown="catch_keydown(this);" css='w70' />
			</c:if>
			<c:if test="${theForm.home_sublocation == 0}">
			<select name='home_area' onkeydown='catch_keydown(this);'></select>
			</c:if>
			</div>--><br>	
			&nbsp;<tag:ARRAY id="home_Set" name="home_Set" options="<%=ValueMaping.USERSET_TYPE%>" value='${theForm.home_Set}' css="w50" />
			</div>  
	    <p><label>爱好关注:</label>
		 <div >
         <ul>
         <%String interest = (String)request.getAttribute("interest"); 
         String interestSet = (String)request.getAttribute("interestSet");
         if(interestSet == null) interestSet = "";
         if(interest != null && !"".equals(interest)) {
        	 String[] interestArr = interest.split(",");
         %>      
            <li style="hidden;" ><%for(int i = 0;i<interestArr.length;i++) {
            	String name = (String)UserConstant.map.get(interestArr[i]);
            	if(name == null) name = ""; else name = name + " ";
            %>
            <%=name%> 
            <%} %>
            &nbsp;&nbsp;<a href="${cpath}/user/interests.jsp?interest=<%=interest%>&interestSet=<%=interestSet%>">>>更多</a> 
            </li>
		 <%  	
         }
		 %>

         </ul> 
         </div>
			<div class="clearFloat"></div>    
          </div>  
         <p class="txtCenter">
		 <a href="javascript:doRegister();" class="btn_r">保  存</a> &nbsp;&nbsp;
		 <a href="javascript:openNewDiv('updpwddiv');" class="btn_r">修改密码</a>		
		 </p>
		<!--隐藏域-->
		<input type="hidden" name='userID'			value='${userID}'/>
	<input type="hidden" name='nick'				value='${theForm.nick}'/>

	<input type="hidden" name='work_location'		value='${theForm.work_location}'/>
	<input type="hidden" name='work_sublocation'	value='${theForm.work_sublocation}'/>
	<input type="hidden" name='work_area'			value='${theForm.work_area}'/>
	<input type="hidden" name='villageID'			value='${theForm.villageID}'/>
	<input type="hidden" name='village'				value='${theForm.village}'/>
	<input type="hidden" name='building'			value='${theForm.building}'/>
	<input type="hidden" name='houseNo'				value='${theForm.houseNo}'/>
	<input type="hidden" name='mapXY'				value='${theForm.mapXY}'/>
	<input type="hidden" name='fangchanNo'			value='${theForm.fangchanNo}'/>
	<input type="hidden" name='fcNoSet'				value='${theForm.fcNoSet}'/>
	<input type="hidden" name='inTime'				value='${theForm.inTime}'/>
	<input type="hidden" name='inTimeSet'			value='${theForm.inTimeSet}'/>
	<input type="hidden" name='famSts'				value='${theForm.famSts}'/>
	<input type="hidden" name='famStsSet'			value='${theForm.famStsSet}'/>
	<input type="hidden" name='liveSts'				value='${theForm.liveSts}'/>
	<input type="hidden" name='liveStsSet'			value='${theForm.liveStsSet}'/>
	
	<input type="hidden" name='email'				value='${theForm.email}'/>		
	<input type="hidden" name='mobile'				value='${theForm.mobile}'/>		

	<input type="hidden" name='birthday'				value='${theForm.birthday}'/>
	<input type="hidden" name='birthdaySet'				value='${theForm.birthdaySet}'/>
	<input type="hidden" name='name'				value='${theForm.name}'/>
	<input type="hidden" name='certtype'			value='${theForm.certtype}'/>
	<input type="hidden" name='certno'				value='${theForm.certno}'/>
	<input type="hidden" name='certSet'				value='${theForm.certSet}'/>
	<input type="hidden" name='introduction'		value='${theForm.introduction}'/>
	<input type="hidden" name='picID'				value='${theForm.picID}'/>
	<input type="hidden" name='work'				value='${theForm.work}'/>
	<input type="hidden" name='workSet'				value='${theForm.workSet}'/>
	<input type="hidden" name='home_town'			value='${theForm.home_town}'/>
	<input type="hidden" name='isArmy'				value='${theForm.isArmy}'/>
	<input type="hidden" name='army'				value='${theForm.army}'/>
	<input type="hidden" name='armySet'				value='${theForm.armySet}'/>
	<input type="hidden" name='education'			value='${theForm.education}'/>
	<input type="hidden" name='highSchool'			value='${theForm.highSchool}'/>
	<input type="hidden" name='hsFinshDate'			value='${theForm.hsFinshDate}'/>
	<input type="hidden" name='college'				value='${theForm.college}'/>
	<input type="hidden" name='colFinshDate'		value='${theForm.colFinshDate}'/>
	<input type="hidden" name='schoolSet'			value='${theForm.schoolSet}'/>
	<input type="hidden" name='interest'			value='${theForm.interest}'/>
	<input type="hidden" name='interestSet'			value='${theForm.interestSet}'/>
		<input type="hidden" name='fcPicID'			value='${theForm.fcPicID}'/>

         </form>  
        </div>        
		<a href="${cpath}/users.do?action=modifyPage&userID=${userID}" class="syzl">所有资料</a>
      </div>
      
     <div class="thebox3">
        <h3>我的相册</h3>
        <div class="content">       
         <ul class="theAlbumList3">
		 <c:forEach var="album" items="${albumlist}" varStatus="status"> 
			<li>
              <p class="p1"><a href="${cpath}/gpic.do?action=adlist&qryGAlbumID=${album.galbumID}"><img src="${cpath}/${myfn:getAlbumHeadPic(album.galbumID)}" width="120" height="87" /></a></p> 
               <p class="p2">${album.albumname}（${album.num}）张</p>
             </li> 
		 </c:forEach>
         </ul>        
        </div>
        <a class="more4" href="${cpath}/galbum_adlist/qryGroupID_99999999_qryUserID_${theForm.userID}.html">点击查看更多</a>
      </div>
      
	<div class="thebox3">
        <h3 class="center">发表照片</h3>
        <div class="content">
		<form action="${cpath}/gpic.do" name="upicForm"  enctype="multipart/form-data" >
			<INPUT id="imgWidth" name="imgWidth" type=hidden >
			<INPUT id="imgHeight" name="imgHeight" type=hidden >
			
		  <INPUT id=max_file_size type=hidden value=3096152 name=MAX_FILE_SIZE>
		  <IMG id=oFileChecker style="WIDTH:0px; HEIGHT:0px" onload=check_photo_size()> 	
         <p><label>照片文件：</label>
          <input type="file" name='upFile0' size="12" id = "photoFile" value='' onchange="javascript:check_fileszie(this);"/>
          &nbsp;<label>是否编辑照片</label><input type="checkbox" onclick="showImg(this)">
         </p>
         <p style="padding-top:3px;"><div id="photoDiv" class="con" contentEditable=true style="display:none"><label>照片编辑：&nbsp;</label><img id="photoImg" src="" /></div></p>
         <p style="padding-top:3px;"><label>照片描述：</label>
         <textarea name="descr0" rows="3" cols="31" ></textarea>
         </p>
         <p id="selectalbum" style="display:;height:97px;"><label>所属相册：</label>
			<select name="galbumID" value="">
			<c:forEach var="album" items="${albumlist}" varStatus="status">   
				<option value="${album.galbumID}" >${album.albumname}</option>
			</c:forEach> 		
			</select>
          <a href="javascript:create_album();">创建新相册</a>
         </p>
		<div id="ulalbum" style="display:none;">
         <p><label>相册名称：</label>
          <input type="text" name='albumname' value=''  />
         </p>
         <p><label>相册说明：</label>
         <textarea name="albuminfo" rows="3" cols="31" ></textarea>
         </p>
         <p><label>相册隐私：</label>
         <tag:ARRAY  id="protect" name="protect" options="<%=ValueMaping.USERSET_TYPE%>" value='1'/>&nbsp;<a  href="javascript:cancel_create_album();">取消创建</a>
         </p>
		</div>
	
         <p class="txtCenter" style="padding-top:5px;">
		 <a href="javascript:doUadd();" class="btn_r">保  存</a>
		 </p>
	
		<!--隐藏域-->
		<input type="hidden" name='userID'	value='${userID}'/>
		<input type="hidden" name='groupID'	value='99999999'/>
		<input type="hidden" name='action'	value='uadd'/>
         </form>
        </div>
      </div>
      
	<div class="thebox3">
        <h3>我的日志</h3>
        <div class="content">
		<ul class="noticeList">
 		   <c:forEach var="blog" items="${bloglist}" varStatus="status">
           <li><span class="s1"><a href="${cpath}/blog_info/qryBlogID_${blog.blogID}.html"  target="_blank">${fn:substring(blog.title,0,13)}</a></span> <span class="s2">${myfn:formatMDHM(blog.pubTime)}</span></li>
	 	   </c:forEach>   
		</ul>
        </div>
        <a class="more4" href="${cpath}/blog.do?action=list&qryUserID=${userID}">点击查看更多</a>
      </div>  
      
	<div class="thebox3">
        <h3 class="center">发表日志</h3>
        <div class="content">
		<form class="frmSendLog" action="${cpath}/blog.do" name="blogForm"  method="post" enctype="multipart/form-data" >
         <p><label>标题：</label><input type="text" name='title' value='' />
             <tag:ARRAY  id="blogSet" name="blogSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1'/>
         </p>
         <p><label>内容：</label>
          <textarea name="blogcont" rows="7" cols="45" ></textarea>
         </p>
         <p class="txtCenter">
		 <a href="javascript:AddBlog();" class="btn_r">保  存</a>
		 </p>
		<!--隐藏域-->
		<input type="hidden" name='userID'	value='${userID}'/>
		<input type="hidden" name='content'	value=''/>
		<input type="hidden" name='replyFlg' value='1'/>
		<input type="hidden" name='blogSet'	value='1'/>
		<input type="hidden" name='status'	value='1'/>
		<input type="hidden" name='action'	value='add'/>
        </form>    
        
        </div>
      </div>
      
	<div class="thebox3">
        <h3>互动区</h3>
        <div class="content content-hd">
     <dl style="height:105px;OVERFLOW: hidden;">
       <dt>
         <span class="s1">主题</span>
         <span class="s2">发送者</span>
         <span class="s3">发送时间</span>
         <span class="s4">操作</span>
        </dt>
	   <c:forEach var="msg" items="${msglist}" varStatus="status">  
       <dd >
         <span class="s1"><a href="javascript:disEmail('${msg.title}','${msg.msgID}')">${fn:substring(msg.title,0,18)}</a></span>
         <span class="s2"><a href="${cpath}/users_home/userID_${msg.sender}.html" target="_blank">${myfn:getUserNick(msg.sender)}</a></span>
         <span class="s3">${myfn:formatMDHM(msg.stime)}</span>
         <span class="s4" style="text-align:left;">
		 <a href="${cpath}/msg.do?action=del&qryReceiver=${userID}&seqID=${msg.seqID}" title="删除"><img src="${cpath}/icon/icon02.gif" width=14 height=14/></a>&nbsp;
		 <c:if test="${msg.status == '1'}">
			<c:if test="${msg.mtype == '3'|| msg.mtype == '4'}">
			<a href="${cpath}/msg.do?action=deal&qryReceiver=${userID}&seqID=${msg.seqID}"><img src="${cpath}/icon/ok.gif" title="同意" width=14 height=14/></a>&nbsp; 
			</c:if>
			<c:if test="${msg.mtype == 'A' || msg.mtype == 'B' || msg.mtype == 'C'}">
			<a href="${cpath}/msg.do?action=deal&qryReceiver=${userID}&seqID=${msg.seqID}" title="验证通过"><img src="${cpath}/icon/okay.png" width=14 height=14/></a>&nbsp; 
			</c:if>
		 </c:if>
		 <c:if test="${msg.mtype != '3' && msg.mtype != '4' && msg.mtype != '9' && msg.mtype != 'A'}">
			<a href="javascript:reply('${msg.receiver}','${msg.sender}','${msg.mtype}','${msg.title}');" title="回复TA"><img src="${cpath}/icon/mtag.gif" width=14 height=14/></a>&nbsp;
		 </c:if>
		 <c:if test="${msg.status == '1'}">
		 <a href="javascript:openliuyan('我投诉：${myfn:getUserNick(msg.sender)}','${msg.sender}','2','${msg.seqID}');" title="举报"><img src="${cpath}/icon/contact_blue_remove.png" width=14 height=14/></a>
		 </c:if>
		 </span>
       </dd>
	   </c:forEach>
     </dl>
	 <form action="${cpath}/msg.do" name="form_msg"  method="post" enctype="multipart/form-data" class="sendSubject" >
        <p><textarea name="msg" style=" width:345px; height:60px;"></textarea></p>
        <p>
		<a href="javascript:msgsubmit();" class="btn_r">保  存</a>
		</p>
		<input type="hidden" name='receiver'	value=''/>
		<input type="hidden" name='sender'		value=''/>
		<input type="hidden" name='sendertype'	value='1'/>
		<input type="hidden" name='mtype'		value=''/>
		<input type="hidden" name='title'		value=''/>
		<input type="hidden" name='qryReceiver'	value='${userID}'/>
		<input type="hidden" name='seqID'		value=''/>		
		<input type="hidden" name='action'		value='del'/>		
     </form>
        </div>
        <a class="more4" href="${cpath}/msg.do?action=list&qryReceiver=${userID}">点击查看更多</a>
      </div>
        
    </div>
      
      
   <div class="clearFloat"></div>
 </div> 
 <!--主体 end -->
 
 
 <!--页脚 start -->
 <%@ include file="/foot.jsp"%>
 <!--页脚 end --> 
</div>
<!--外套 end -->
		<!-- 转发 弹出层 -->
		<DIV class=dragdiv id="disemail" style="DISPLAY:none ">
		<DIV class="otherdiv filterbox">
		<B class=g1></B><B class=g2></B><B class=g3></B><B class=g4></B>
		<DIV class="content filterbox"></DIV>
		<B class=g4></B><B class=g3></B><B class=g2></B><B class=g1></B></DIV>
		<DIV class=otherdivin>
		<H2><SPAN><A title=关闭 style="CURSOR: pointer" onclick="closeMask('disemail')"><IMG src="${cpath}/icon/icon02.gif"></A></SPAN>互动内容： </H2>
			<DL  id="emaildl">
			<DD><EM>标  题：</EM><div id="distitle"></div></DD>
			<DD><EM>内  容：</EM><div id="discontent"></div></DD>
			</DL>
		</DIV></DIV>
		<!-- 弹出层结束 -->
		<!-- 转发 弹出层 -->
		<DIV class=dragdiv id=updpwddiv style="DISPLAY:none ">
		<DIV class="otherdiv filterbox">
		<B class=g1></B><B class=g2></B><B class=g3></B><B class=g4></B>
		<DIV class="content filterbox"></DIV>
		<B class=g4></B><B class=g3></B><B class=g2></B><B class=g1></B></DIV>
		<DIV class=otherdivin>
		<H2><SPAN><A title=关闭 style="CURSOR: pointer" onclick="closeMask('updpwddiv')"><IMG src="${cpath}/icon/icon02.gif"></A></SPAN>修改密码： </H2>
 		<form action="${cpath}/users.do?action=updpwd" name="updpwdForm" id="updpwdForm"  method="post" >
			<DL >
			<DD><EM>旧&nbsp;&nbsp;密&nbsp;&nbsp;码：</EM><SPAN><input type='password' name='oldpwd' value='' class="short" maxlength=20/></SPAN></DD>
			<DD><EM>新&nbsp;&nbsp;密&nbsp;&nbsp;码：</EM><SPAN><input type='password' name='newpwd' value='' class="short" maxlength=20/></SPAN></DD>
			<DD><EM>再输一次：</EM><SPAN><input type='password' name='chkpass' value='' class="short"  maxlength=20/></SPAN></DD>
			<DD><EM><INPUT type=button class='shortBtn' name=send value="确  定" onclick="updpwd();">&nbsp;&nbsp;
			<INPUT type=button class='shortBtn'  name=cancel value="取  消" onclick="closeMask('updpwddiv');"></EM>
			</DD>
			</DL>
			<!--隐藏域-->
			<input type="hidden" name='userID' value='${theForm.userID}'/>
			<input type="hidden" name='password' value='${theForm.password}'/>
		</form>  
		</DIV></DIV><!-- 弹出层结束 -->

		<!-- 转发 弹出层 -->
		<DIV class=dragdiv id=notadv style="DISPLAY:none">
		<DIV class="otherdiv filterbox">
		<B class=g1></B><B class=g2></B><B class=g3></B><B class=g4></B>
		<DIV class="content filterbox"></DIV>
		<B class=g4></B><B class=g3></B><B class=g2></B><B class=g1></B></DIV>
		<DIV class=otherdivin>
		<H2><SPAN><A title=关闭 style="CURSOR: pointer" onclick="closeMask('notadv')"><IMG src="${cpath}/icon/icon02.gif"></A></SPAN><div id='divtitle'>我要投诉：</div> </H2>
 		<form action="${cpath}/notadv.do?action=toususer" name="liuyanForm" id="liuyanForm"  method="post" >
			<DL  id="emaildl">
			<DD><EM>标  题：</EM><SPAN><input type='text' name='title' value='${username}的投诉' class="long"/></SPAN></DD>
			<DD><textarea name="content" rows="8" cols="50" ></textarea>
			</DD>
			<DD><EM><INPUT type=button class='shortBtn' name=send value="确  定" onclick="addliuyan('liuyanForm');">&nbsp;&nbsp;
			<INPUT type=button class='shortBtn'  name=cancel value="取  消" onclick="closeMask('notadv');"></EM>
			</DD>
			</DL>
			<!--隐藏域-->
			<input type="hidden" name='userID'	value='${userID}'/>
			<input type="hidden" name='nsort'	value='5'/>
			<input type="hidden" name='nsortID' value=''/>
			<input type="hidden" name='ntype'	value='3'/>
			<input type="hidden" name='tsfr' value=''/>
			<input type="hidden" name='tsfrID' value=''/>
		</form>  
		</DIV></DIV><!-- 弹出层结束 -->

        
		
<!-- 私聊的div -->	
<div class="dragDiv" id="mainDiv" style="width:400px;left:500px; top:120px;">
    <div id="headDiv" class="headDiv" onmousedown="divController.beginDrag(this.parentNode,event);">
    <table>
    <tr>
      <td align="left" width="85%" id="divTitleTd" class="btn">
      </td>
      <td align="right">
      <a onclick="divController.toMinimize();" href="#" class="btn">
        -
      </a>
      <a onclick="divController.toMaximize();" href="#" class="btn">
        +
      </a>
      <a onclick="divController.closeDiv();" href="#" class="btn">
        x
      </a>
      </td>
    </tr>
    </table>
    </div>
    <div id="bodyDiv" class="bodyDiv">
        <form action="${cpath}/msg.do" name="form_msg_p"  method="post" enctype="multipart/form-data" class="leaveWord2" >
          <p>
            <textarea name="msg"  id="msg" cols="50" rows="10" ></textarea>
          </p>
          <p class="color_grey1">
            <a href="javascript:void(pmsgsubmit());">
              <img src="${cpath}/images/icon_43.gif" />
            </a>
          </p>
          <!--隐藏域-->
          <input type="hidden" name='receiver'	value=''/>
          <input type="hidden" name='sender'		value='${userID}'/>
          <input type="hidden" name='sendertype'	value='1'/>
          <input type="hidden" name='mtype'		value='1'/>
          <input type="hidden" name='title'		value='${username}给你的私信'/>
          <input type="hidden" name='action'		value='sendMsg'/>
        </form>
    </div>
  </div>

</body>
</html>
<script type="text/javascript">
  var oFCKeditor = new FCKeditor('blogcont');	//传入参数为表单元素（由FCKeditor生成的input或textarea）的name
      oFCKeditor.BasePath='${cpath}/fckeditor/';//指定FCKeditor根路径，也就是fckeditor.js所在的路径
      oFCKeditor.Height='130px';
      oFCKeditor.Width='360px';
      oFCKeditor.ToolbarSet='Demo';				//指定工具栏 Basic
	  oFCKeditor.ReplaceTextarea();
</script>

<script type="text/javascript">
/*
  var oFCKeditor = new FCKeditor('fck');	//传入参数为表单元素（由FCKeditor生成的input或textarea）的name
      oFCKeditor.BasePath='${cpath}/fckeditor/';//指定FCKeditor根路径，也就是fckeditor.js所在的路径
      oFCKeditor.Height='130px';
      oFCKeditor.Width='360px';
      oFCKeditor.ToolbarSet='Demo';				//指定工具栏
	  oFCKeditor.ReplaceTextarea();*/
</script>
<script type="text/javascript">
		//弹出提示层
		function openNewDiv(_id) 
		{
				var m = "mask";
				if(document.getElementById(m)) document.body.removeChild(document.getElementById(m));
				var newMask = document.createElement("div");
				newMask.id = m;
				newMask.style.position = "absolute";
				newMask.style.zIndex = "1";
				_scrollWidth = Math.max(document.body.scrollWidth,document.documentElement.scrollWidth);
				_scrollHeight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
				newMask.style.width = _scrollWidth + "px";
				newMask.style.height = _scrollHeight + "px";
				newMask.style.top = "0px";
				newMask.style.left = "0px";
				newMask.style.background = "#33393C";
				newMask.style.filter = "alpha(opacity=40)";
				newMask.style.opacity = "0.30";
				document.body.appendChild(newMask);
				showDiv = document.getElementById(_id);
				showDiv.style.display = "block";
				showDiv.style.position = "absolute";
				showDiv.style.zIndex = "9999";
				showDivWidth = 488;
				showDivHeight = 314;
				showDiv.style.top = (document.documentElement.scrollTop + document.documentElement.clientHeight/2 - showDivHeight/2) + "px";
				showDiv.style.left = (document.documentElement.scrollLeft + document.documentElement.clientWidth/2 -  showDivWidth/2) + "px";
		}
		function closeMask(_id)
		{
				var m = "mask";
				if(document.getElementById(m)) document.body.removeChild(document.getElementById(m));
				showDiv = document.getElementById(_id);
				showDiv.style.display = "none";
		}
	function disEmail(tit,msgID)
	{
		my_getbyid('distitle').innerHTML = tit;
		openNewDiv("disemail");
		getMsgcont(msgID,'discontent');
	}


	function updpwd()
	{
		var form = document.updpwdForm;

		var password = form['password'];
		var oldpwd = form['oldpwd'];
		var newpwd = form['newpwd'];
		var chkpass = form['chkpass'];

		if (password.value != oldpwd.value)
		{
			alert("【旧密码】不正确\n");
			oldpwd.focus();
			return false;
		}
		if (newpwd.value == "" )
		{
			alert("【新密码】不允许为空\n");
			newpwd.focus();
			return false;
		}

		if (newpwd.value != "" && (password.value.replace(/(^\s*)|(\s*$)/g,"").length < 6 || password.value.length > 20))
		{
			alert("【新密码】长度不符合规范，要求6－20位\n");
			newpwd.focus();
			return false;
		}

		if (newpwd.value != chkpass.value)
		{
			alert("【再输密码】与新密码不一致\n");
			chkpass.focus();
			return false;
		}
		password.value = newpwd.value;

		form.submit();
	}

  /**
     * 检查项目资料维护
     */
	function openliuyan(tit,id,fr,frid)
	{
		var userID = "${userID}";
		if(userID == '' ){
			alert('留言需要登录网站');
			window.location.href ="${cpath}/index.jsp";
			return false;
		}
		var form = document.liuyanForm;

		var nsortID = form['nsortID'];		
		var title = form['title'];
		var content = form['content'];
		var tsfr = form['tsfr'];
		var tsfrID = form['tsfrID'];
		
		nsortID.value = id;
		title.value = tit;
		tsfr.value = fr;
		tsfrID.value = frid;

		/*
		if(type != ""){

			ntype.value = type;
			document.getElementById('divtitle').innerHTML = "发送留言";	
			document.getElementById('radiotype').style.display = "none";
			
		}else{
		
			ntype.value = "3";
			document.getElementById('divtitle').innerHTML = "投诉";			
			document.getElementById('radiotype').style.display = "";
		}
		*/

		openNewDiv("notadv");
	}

	/*
     * 检查项目资料维护
     */
	function addliuyan(objForm)
	{

		var userID = "${userID}";
		if(userID == '' ){
			alert('留言需要登录网站');
			window.location.href ="${cpath}/index.jsp";
			return false;
		}
		var obj	= document.getElementById(objForm);

		var ntype = obj.ntype;
		if(ntype.value == "")
  		{
			alert('类型不能为空');
			ntype.select();
			return ;
		}
		var title = obj.title;
		if(title.value == null||title.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
  		{
			alert('标题不能为空');
			title.select();
			return ;
		}
		var nsort = obj.nsort;
		if(nsort.value == "")
  		{
			alert('板块不能为空');
			nsort.select();
			return ;
		}
		
		var content = obj.content;
		if(content.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
		{
			alert('内容不能为空');
			return ;
		}
		if(content.value.length > 2000)
		{
			alert('内容长度不能大于2000');
			return ;
		}
		obj.submit();
	}


    /**
     * 检查项目资料维护
     */
	function AddBlog()
	{
		var form = document.blogForm;

		var title = form['title'];
		var content = form['content'];
		var userID = form['userID'];
		var blogcont = FCKeditorAPI.GetInstance("blogcont").GetXHTML("true");   
		
		if(userID.value == null||userID.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
  		{
			window.location.replace("${cpath}/index.jsp"); 
			return ;
		}
		if(title.value == null||title.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
  		{
			alert('标题不能为空');
			title.select();
			return ;
		}
		content.value = blogcont;
		if(content.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
		{
			alert('日志内容长度不能为空！');
			return ;
		}
		if(content.length > 50000)
		{
			alert('内容长度不能大于50000,当前长度：' + content.length);
			return ;
		}

		form.submit();
	}

	function chgArmy(is)
	{
		if(is == '1'){
		
			my_getbyid('spanarmy').style.display="";
		}else{
		
			my_getbyid('spanarmy').style.display="none";
		}
	}

	function check_photo_size()
	{
		img_temp = my_getbyid('oFileChecker');
		var limit = parseInt(my_getbyid('max_file_size').value);
		if (img_temp.fileSize > limit) {
			alert("照片文件过大，请选择2M以下的文件上传");
			return false;
		}
	}
	function check_loadfile(filePicker)
	{
		var patn = /.jpg$|.jpeg$|.gif$/i;  
		if(patn.test(filePicker.value)) {
			img_temp = my_getbyid('oFileChecker');
			img_temp.src = filePicker.value;
		} else {
			alert('您选择的不是合法的图片文件,支持文件格式：.jpg/.jpeg/.gif，请重新选择');
			filePicker.value='';
			return false;
		}
		return true;
	}
	function disoper(obj)
	{
		my_getbyid(obj).style.display="block";

	}
	function closeoper(obj)
	{
		my_getbyid(obj).style.display="none";
	}

	function create_album()
	{
		my_getbyid('selectalbum').style.display="none";
		my_getbyid('ulalbum').style.display="";
	}
	function cancel_create_album()
	{
		my_getbyid('selectalbum').style.display="";
		my_getbyid('ulalbum').style.display="none";
	}

	function check_photo_size()
	{
		img_temp = my_getbyid('oFileChecker');
		var limit = parseInt(my_getbyid('max_file_size').value);
		if (img_temp.fileSize > limit) {
			alert("照片文件过大，请选择2M以下的文件上传");
			return false;
		}
	}
	function check_fileszie(filePicker)
	{
		var patn = /.jpg$|.jpeg$|.gif$/i;  
		if(patn.test(filePicker.value)) {
			img_temp = my_getbyid('oFileChecker');
			img_temp.src = filePicker.value;
		} else {
			alert('您选择的不是合法的图片文件,支持文件格式：.jpg/.jpeg/.gif，请重新选择');
			filePicker.value='';
			return false;
		}
		return true;
	}
    /**
     * 上传照片
     */
	function doUadd()
	{			
		var form = document.upicForm;

		var upFile0 = form['upFile0'];
        if(!check_loadfile(upFile0))
        {
			return ;
        }
		var descr0 = form['descr0'].value;
		if (descr0 == "" || descr0.replace(/(^\s*)|(\s*$)/g,"").length < 2 || descr0.replace(/(^\s*)|(\s*$)/g,"").length > 200)
		{
			alert("照片描述不能为空\n");
			form['descr0'].focus();
			return ;
		}

	
		var albumname = form['albumname'];
		if (albumname.value.replace(/(^\s*)|(\s*$)/g,"") != "")
		{
			if (!confirm("您确定要创建新相册:" + albumname.value + " ?"))
			{
				albumname.value = "";
				var galbumID = form['galbumID'];
				if(galbumID.value == ""){

					alert("请选择相册");
					return ;
				}
			}
			var protect = form['protect'];
			if(protect.value == ""){

				alert("请选择相册隐私");
				return ;
			}
		}else{		
				var galbumID = form['galbumID'];
				if(galbumID.value == ""){

					alert("请选择相册");
					return ;
				}
		}
		var action = form['action'];

		var photoImg = document.getElementById("photoImg");
		//alert("width = " + photoImg.width + ",height = " + photoImg.height);
		form['imgWidth'].value = photoImg.width;
		form['imgHeight'].value = photoImg.width;;
		form.submit();
	}

    /**
     * 检查项目资料维护
     */
	function DelMsg(id)
	{
		if (!confirm("您确定要删除这封邮件吗？"))
		{
			return;
		}
		var form = document.form_msg;

		var seqID = form['seqID'];

		seqID.value = id;
		
		form.submit();
	}
	function reply(recv,snd,mt,tit)
	{
		var form = document.form_msg;
		var receiver = form['receiver'];
		var sender = form['sender'];
		var mtype = form['mtype'];
		var title = form['title'];
		var msg = form['msg'];
		sender.value = recv;
		receiver.value = snd;
		title.value = "回复：" + tit;
		mtype.value = mt;
		msg.value = "回复：" + tit  + "  ";
		//alert(receiver.value);
		msg.focus();
	}


	function msgsubmit()
	{
		var form = document.form_msg;
		var sender = form['sender'];
		var receiver = form['receiver'];
		var action = form['action'];
		action.value = "mainsend";

		if(sender.value == '' || receiver.value == ''){
			//alert('请登陆网站');
			//window.location.href ="${cpath}/index.jsp";
			return;// false;
		}
		if(form['msg'].value == ''){
			alert('内容不能为空');
			return;
		}
		if(form['msg'].value.length > 2000){
			alert('内容超长');
			return;
		}
		form.submit();

	}

	function pmsgsubmit()
	{
		var form = document.forms['form_msg_p'];
		var msg = form['msg'].value;

		//alert(form['receiver'].value);
		if(msg == ''){
			alert('内容不能为空');
			return false;
		}
		if(msg.length > 2000){
			alert('内容超长');
			return false;
		}
		//form.submit();

		var url = "${cpath}/msg.do?action=sendMsg&receiver=" + form['receiver'].value + "&msg=" + encodeURIComponent(msg);
		XMLHttpOpenURL(url, doAfterSendMsg);

	}

	function doAfterSendMsg(result) {
		divController.closeDiv();
	}

	
	function chgly(type,sort,sortid,id,tit)
	{
		var form = document.form_liuyan;
		var ntype = form['ntype'];
		var nsort = form['nsort'];
		var nsortID = form['nsortID'];
		var seqID = form['seqID'];
		var title = form['title'];
		var content = form['content'];
		if(seqID.value != ""){
			document.getElementById('ly' + seqID.value).style.background = "#fff";
		}
		ntype.value = type;
		nsort.value = sort;
		nsortID.value = sortid;
		seqID.value = id;
		title.value = tit;
		document.getElementById('ly' + id).style.background = "#F2F3F6";

		content.focus();
	}
	//filter keywords
	function check_durty_words(thisinput)
	{

		var durty_words = new Array("系统","管理","master","版主","斑竹","客服","root","颁奖","活动","提示","兑奖","通知");
		for(i=0;i<durty_words.length;i++)
		{
			if (thisinput.indexOf(durty_words[i])>=	0)
			{
				return durty_words[i];
			}
		}
		return false;
	}

	function chkForm_new(objForm)
	{

		var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/;
		var rs = /^[0-9]{2,3}$/;
		var rc = /^[0-9|a-z]{5}$/;

		var email = objForm.email.value;
		var nick = objForm.nick.value;
		var name = objForm.name.value;
		/*

		var filter = check_durty_words(objForm.nick.value);

		if (nick == "" || nick.replace(/(^\s*)|(\s*$)/g,"").length<2 || nick.replace(/(^\s*)|(\s*$)/g,"").length>16)
		{
			alert("【用户名】不能为空或格式不符合规范\n");
			objForm.nick.focus();
			return false;
		}
		if (filter)
		{
			alert("“"+filter+"”不能在【用户名】中使用\n");
			objForm.nick.focus();
			return false;
		}
	 
		for(var i=0;i<email.length;i++)
		{   
		   strCode=email.charCodeAt(i);   
		   if((strCode>65248)||(strCode==12288)){   
					 alert("【注册邮箱】含全角字符，请切换输入法，输入半角字符");
					 objForm.email.focus();
				   return false;
		   } 
		} 
		var password = objForm.password.value;

		if (password != "" && (password.replace(/(^\s*)|(\s*$)/g,"").length < 6 || password.length > 20))
		{
			alert("【密码】长度不符合规范\n");
			objForm.password.focus();
			return false;
		}

		if (objForm.password.value != objForm.chkpass.value)
		{
			alert("【确认密码】与密码不一致\n");
			objForm.chkpass.focus();
			return false;
		}
		if (name == "" || name.replace(/(^\s*)|(\s*$)/g,"").length<2 || name.replace(/(^\s*)|(\s*$)/g,"").length>50)
		{
			alert("【真实姓名】不能为空或格式不符合规范\n");
			objForm.name.focus();
			return false;
		}

		var work_location = objForm.work_location;
		if (work_location == null || work_location.value == "")
		{
			alert("请选择居住省份\n");
			objForm.work_location.focus();
			return false;
		}
		var work_sublocation = objForm.work_sublocation;
		if (work_sublocation == null )
		{
			alert("请选择居住地市\n");
			objForm.work_sublocation.focus();
			return false;
		}
		if (work_sublocation.value == "" || work_sublocation.value == "0")
		{
			alert("请选择居住地市\n");
			objForm.work_sublocation.focus();
			return false;
		}
		var work_area = objForm.work_area;
		if (work_area == null )
		{
			alert("请选择居住区县\n");
			objForm.work_area.focus();
			return false;
		}
		if (work_area.value == "" || work_area.value == "0")
		{
			alert("请选择居住区县\n");
			objForm.work_area.focus();
			return false;
		}
		var villageID = objForm.villageID;
		var village = objForm.village;
		if ((villageID == null ||villageID.value == "") && (village == null || village.value == ""))
		{
			alert("【小区】不能为空\n");
			return false;
		}
		var certtype = objForm.certtype.value;
		if (certtype == "")
		{
			alert("请选择【证件类型】\n");
			objForm.certtype.focus();
			return false;
		}

		var certno	= objForm.certno;
		if (certno.value.replace(/(^\s*)|(\s*$)/g,"").length == 0 )
		{
			alert("【证件号码】不能为空\n");
			objForm.certno.focus();
			return false;
		}

		var chkcertno	= isIdCardNo(certno);
		if (chkcertno != "校验正确！")
		{
			alert("【身份证号】不符合规范\n");
			objForm.certno.focus();
			return false;
		}

		if (email == "" || (!email.match(re)))
		{
			alert("【注册邮箱】不能为空或格式不符合规范\n");
			objForm.email.focus();
			return false;
		}

		var mobile	= objForm.mobile.value;
		var mobilers =/^(1[0-9]{10})$/;
        if(!mobilers.test(mobile))
        {
			alert("【手机】格式不符合规范\n");
			objForm.mobile.focus();
			return false;
        }

		var picIDPath	= objForm.picIDPath;

        if(picIDPath.value != "" && !check_loadfile(picIDPath))
        {
			return false;
        }
		var fcPicIDPath	= objForm.fcPicIDPath;
        if( fcPicIDPath.value != "" && !check_loadfile(fcPicIDPath))
        {
			return false;
        }
		*/
		var famSts	= objForm.famSts.value;
		var famStsSet	= objForm.famStsSet.value;
        if(famStsSet == "" && famSts != "")
        {
			objForm.famStsSet.value = "1"; 
        }
		
		var liveSts	= objForm.liveSts.value;
		var liveStsSet	= objForm.liveStsSet.value;
        if(liveStsSet == "" && liveSts != "")
        {
			objForm.liveStsSet.value = "1"; 
        }

		var inTime	= objForm.inTime.value;
		var inTimeSet	= objForm.inTimeSet.value;
        if(inTimeSet == "" && inTime != "")
        {
			objForm.inTimeSet.value = "1"; 
        }

		var home_location	= objForm.home_location.value;
		var home_Set	= objForm.home_Set.value;
        if(home_Set == "" && home_location != "")
        {
			objForm.home_Set.value = "1"; 
        }

		var highSchool	= objForm.highSchool.value;
		var college	= objForm.college.value;

		var schoolSet	= objForm.schoolSet.value;
        if(schoolSet == "" && (highSchool != "" || college !=""))
        {
			objForm.schoolSet.value = "1"; 
        }

		var army	= objForm.army.value;
		var armySet	= objForm.armySet.value;
        if(armySet == "" && army != "")
        {
			objForm.armySet.value = "1"; 
        }

		var work	= objForm.work.value;
		var workSet	= objForm.workSet.value;
        if(workSet == "" && work != "")
        {
			objForm.workSet.value = "1"; 
        }

		var skill	= objForm.skill.value;
		var skillSet	= objForm.skillSet.value;
        if(skillSet == "" && skill != "")
        {
			objForm.skillSet.value = "1"; 
        }

		var ids = document.getElementsByName("chkboxinterest"); 
		var inter = "";
		for (var i = 0; i < ids.length; i++) 
		{ 
			if(ids[i].checked){
				inter += ids[i].value;
				inter += ",";
			}
		} 
		objForm.interest.value = inter;

		var interestSet	= objForm.interestSet.value;
        if(interestSet == "" )
        {
			objForm.interestSet.value = "1"; 
        }

		return true;
	}

	function doRegister()
	{

		var obj	= document.getElementById('theForm');
		if(!chkForm_new(obj))
		{
			return false;
		}
		obj.submit();
	}

	function lysubmit()
	{
		var form = document.form_liuyan;
		var userID = form['userID'];

		if(userID.value == ''){
			alert('请登陆网站');
			window.location.href ="${cpath}/user/login.jsp";
			return false;
		}
		if(document.getElementById('content').value == ''){
			alert('内容不能为空');
			return false;
		}
		if(document.getElementById('content').value.length > 300){
			alert('内容超长');
			return false;
		}
		document.getElementById('form_liuyan').submit();
	}

	function disall(id2,id3)
	{	
		if(document.getElementById(id2).style.display == "none"){		
			document.getElementById(id2).style.display = "block";
			document.getElementById(id3).style.height = "auto";
		}else{
			document.getElementById(id2).style.display = "none";
			document.getElementById(id3).style.height = "346px";
		}
	}

	function my_getbyid(id)
	{

		 itm = null;
		 if (document.getElementById)
		 {
				itm = document.getElementById(id);
		 }
		 else if (document.all)
		 {
				itm = document.all[id];
		 }
		 else if (document.layers)
		 {
				itm = document.layers[id];
		 }		 
		 return itm;
	}
	function getAjaxdata(div,id)
	{

		var xmlHttp;
		start = true;
		try
		{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{    // Internet Explorer    
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		var url;
		if(div =="divsecsort"){

			url = "${cpath}/param/getproperty.jsp?assortID=2&parentID=" + id ;

		}else if(div =="cnpid" ){
		
			url = "${cpath}/param/getCnpid.jsp?pid=" + id ;
			my_getbyid("cncid").innerHTML="<select name='work_Area' onkeydown='catch_keydown(this);'></select>";
		}else if(div =="homepid" ){
		
			url = "${cpath}/param/getCnpid.jsp?pid=" + id ;
			//my_getbyid("homecid").innerHTML="<select name='work_Area' onkeydown='catch_keydown(this);'></select>";
		}else {

			url = "${cpath}/param/getCncid.jsp?cid=" + id;
		}
		if (start)
		{
			my_getbyid(div).innerHTML='后台取数据……';
			xmlHttp.onreadystatechange=function()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var ret_str = xmlHttp.responseText;
					if(div =="divsecsort"){
						var secsort = "<select name='secsort' onkeydown='catch_keydown(this);'>" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else if(div =="cnpid"){

						var secsort = "<select name='work_sublocation' onkeydown='catch_keydown(this);' css='w70'" +
							" onChange=\"getAjaxdata('cncid',this.value)\">" + 
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else if(div =="homepid"){

						var secsort = "<select name='home_sublocation' onkeydown='catch_keydown(this);' css='w70'" +
							" >" + 
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else if(div =="homecid"){

						var secsort = "<select name='home_area' id='home_area' onkeydown='catch_keydown(this);'  css='w70'>" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else{
						var secsort = "<select name='work_area' id='work_area' onkeydown='catch_keydown(this);'  css='w70'>" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;
					}
				}
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}

	//mouse lost the chkpass box
	function check_certno_input(thisinput)
	{

		alert(isIdCardNo(thisinput.value));
	}
	//这个可以验证15位和18位的身份证，并且包含生日和校验位的验证。   
	//如果有兴趣，还可以加上身份证所在地的验证，就是前6位有些数字合法有些数字不合法。 
	function isIdCardNo(thisinput) 
	{   

		var num = thisinput.value.toUpperCase();  
		//身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X。   
		if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(num)))   
		{ 
//		  alert('输入的身份证号长度不对，或者号码不符合规定！\n15位号码应全为数字，18位号码末位可以为数字或X。'); 
		  return '输入的身份证号长度不对'; 
		 } 
		//校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。 
		//下面分别分析出生日期和校验位 
		var len, re; 
		len = num.length; 
		if (len == 15) 
		{ 
			re = new RegExp(/^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/); 
			var arrSplit = num.match(re); 

			//检查生日日期是否正确 
			var dtmBirth = new Date('19' + arrSplit[2] + '/' + arrSplit[3] + '/' + arrSplit[4]); 
			var bGoodDay; 
			bGoodDay = (dtmBirth.getYear() == Number(arrSplit[2])) && ((dtmBirth.getMonth() + 1) == Number(arrSplit[3])) && (dtmBirth.getDate() == Number(arrSplit[4])); 
			if (!bGoodDay) 
			{ 
				return '输入的身份证号里出生日期不对！'; 
			} 
			else 
			{ 
				//将15位身份证转成18位 
				//校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。 
				var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2); 
				var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'); 
				var nTemp = 0, i;   
					num = num.substr(0, 6) + '19' + num.substr(6, num.length - 6); 
				for(i = 0; i < 17; i ++) 
				{ 
					nTemp += num.substr(i, 1) * arrInt[i]; 
				 } 
				 num += arrCh[nTemp % 11];  
				 thisinput.value = num;
				 return '校验正确！';   
			}   
		} 
		if (len == 18) 
		{ 
			re = new RegExp(/^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/); 
			var arrSplit = num.match(re); 

			//检查生日日期是否正确 
			var dtmBirth = new Date(arrSplit[2] + "/" + arrSplit[3] + "/" + arrSplit[4]); 
			var bGoodDay; 
			bGoodDay = (dtmBirth.getFullYear() == Number(arrSplit[2])) && ((dtmBirth.getMonth() + 1) == Number(arrSplit[3])) && (dtmBirth.getDate() == Number(arrSplit[4])); 
			if (!bGoodDay) 
			{ 
//				alert(dtmBirth.getYear()); 
//				alert(arrSplit[2]); 
//				alert('输入的身份证号里出生日期不对！'); 
				return '输入的身份证号里出生日期不对！'; 
			} else { 
				//检验18位身份证的校验码是否正确。 
				//校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。 
				var valnum; 
				var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2); 
				var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'); 
				var nTemp = 0, i; 
				for(i = 0; i < 17; i ++) 
				{ 
					nTemp += num.substr(i, 1) * arrInt[i]; 
				} 
				valnum = arrCh[nTemp % 11]; 
				if (valnum != num.substr(17, 1)) 
				{ 
//					alert('18位身份证的校验码不正确！应该为：' + valnum); 
					return '18位身份证的校验码不正确'; 
				} 
				return '校验正确！'; 
			} 
		} 
		return '校验正确！'; 
	}
   /**
    * 
    */
	function getVillage(div,id)
	{

		var xmlHttp;
		start = true;
		try
		{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{    // Internet Explorer    
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		var url;
		
		url = "${cpath}/shequ/getVillage.jsp?work_area=" + id ;
		my_getbyid(div).innerHTML="<select name='villageID' onkeydown='catch_keydown(this);'></select>";
		if (start)
		{
			my_getbyid(div).innerHTML='后台取数据……';
			xmlHttp.onreadystatechange=function()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var ret_str = xmlHttp.responseText;

					var secsort = "<select name='villageID' onkeydown='catch_keydown(this);'>" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>";
					my_getbyid(div).innerHTML = secsort;
				}
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}
 
   /**
    * 
    */
	function getMsgcont(msgID,div)
	{

		var xmlHttp;
		start = true;
		try
		{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{    // Internet Explorer    
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		var url;
		
		url = "${cpath}/msg/getmsgcont.jsp?msgID=" + msgID ;
		if (start)
		{
			my_getbyid(div).innerHTML='后台取数据……';
			xmlHttp.onreadystatechange=function()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var ret_str = xmlHttp.responseText;

					my_getbyid(div).innerHTML = ret_str;
				}
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}

	function showImg(thisObj) {
		if(thisObj.checked) {
			document.getElementById("photoDiv").style.display = "block";
		} else {
			document.getElementById("photoDiv").style.display = "none";
		}
	}

	//图片预览
	var ip = new ImagePreview( $$("photoFile"), $$("photoImg"), {
		maxWidth: 200, maxHeight: 200, action: "<%=path%>/imageview/viewImg.jsp"
	});
	ip.img.src = ImagePreview.TRANSPARENT;
	ip.file.onchange = function(){ ip.preview(); };
	
</script>